
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>centre de formation de greta</title>
<link href='http://fonts.googleapis.com/css?family=Wellfleet' rel='stylesheet' type='text/css'>
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="wrapper">
<div id="header">
    <jsp:include page="header_admin.jsp" />
</div>
<div id="content">
<div style="text-align:center;padding-top:50px">
    <fieldset>
        <legend>
            <a href="${pageContext.request.contextPath}/acceuilAdmin.jsp">Acceuil</a> | Gestion des candidatures
        </legend>
        <table border="1" cellpadding="3" cellspacing="0">
            <tr style="background: #CCC8CA">
                <td>Nom candidat</td>
                <td>Prenom candidat</td>
                <td>Promo actuelle</td>
                <td>Nouvelle Promo</td>
                <td>Action</td>
            </tr>
            <c:forEach items="${lesCandidatures}" var="cand">
                <tr>
                    
                    <td>${cand.candidat.nom}</td>
                    <td>${cand.candidat.prenom}</td>
                    <td>${cand.promotion.idPromotion}</td>
                    
                        <form action="ModifierPromoCandidat" method="post">
                        <td>
                            <SELECT name="NouvellePromo" size="1"
                                onload="positionnerSelect(this, ${cand.promotion.idPromotion})">
                                
                                <c:forEach items="${lesPromotions}" var="promo">
                                    <OPTION value="${promo.idPromotion}">Promotion Nr. ${promo.idPromotion}</OPTION>
                                </c:forEach>
                                                            
                            </SELECT>
                        </td>
                        <td>
                                <button type="submit">Changer promo</button>
                                
                                <input type="hidden" name="idCandidat" value="${cand.candidat.id}" /> 
                                <input type="hidden" name="idPromotion" value="${cand.promotion.idPromotion}" />
                            </td>
                        </FORM>
                </tr>

            </c:forEach>

        </table>
    </fieldset>
</div>
</div>
<div id="separateur"></div>
<div id="footer">
    <jsp:include page="footer.jsp" />
</div>

